Choosing the Best Managed FaaS Provider
An overview of FaaS providers.
We'll cover the following
The big three#
Which cloud service provider offers the best managed FaaS solution? Is it Azure, AWS, or Google Cloud?
Note: We’ll exclude on-prem solutions. Similarly, we don’t cover all compute providers, but only the “big three.”
There are quite a few criteria we could use to compare FaaS services. Many will depend on the use cases, experience, needs, and so on and so forth.
Let’s start with the supported languages.
Note: The number of supported languages may have increased since this course was written (July 2020).
Google Cloud Functions, Azure Functions, and AWS Lamda services support the languages that follow.
List of Languages
Google Cloud Function | Azure Functions | AWS Lamda | |
C# | No | Yes | Yes |
JavaScript | No | Yes | No |
Node.js | Yes | No | Yes |
F# | No | Yes | No |
Java | Yes | Yes | Yes |
PowerShell | No | Yes | Yes |
Python | Yes | Yes | Yes |
TypeScript | No | Yes | No |
GO | Yes | No | Yes |
Ruby | No | No | Yes |
According to those lists, Google Cloud Functions is the apparent loser, and both Azure and AWS share the trophy. Nevertheless, that often does not matter. The question is not which service supports more languages, but whether our preferred language is available. Also, it’s not only about our preferred language. Some languages are better suited to functions than others.
We should think twice before using a language that needs significant time to initialize processes. In a “normal” situation, waiting for a second for a Java or C# process to start might be okay. After all, one second is almost nothing considering that a process might run for hours, days, or even months. But, in a situation where each request initializes a new instance of the application (function), the initialization time is essential. Even though FaaS providers have managed to overcome some of the hurdles around that issue by keeping functions “warm” for a while, those are still improvements and not real solutions.
JavaScript, Python, and Go are all well suited for functions. They start quickly and work well on a small codebase. Still, the supported languages might influence the decision of where to run functions.
Deployment time#
We can also compare managed FaaS solutions by the amount of time it takes to deploy a function.
AWS | Azure | ||
Initial Installation | ~ 1 min 20 sec | ~ 2 mins | 3 mins |
Updates to existing functions | ~ 30 sec | ~ 2 mins | ~ 20 sec |
Taking all this into account, we can say that AWS is the clear winner. Nevertheless, the extra minute to install or update a function may still not matter much.
While we are on the subject of installations and updates, we might comment on the complexity of performing those operations. But that’s also irrelevant since we didn’t use a provider-native way to create and deploy functions. Instead, we used the Serverless Framework, which works more or less the same way everywhere. To be more precise, with the Serverless Framework, deploying a function is as easy as it can get wherever we run them. So, we can’t use the complexity of deployment operations as an argument that the FaaS of one provider is better than the other.
Availability#
No matter where we run our functions, they’re highly reliable, with more or less the same results across all three providers. To be more precise, Google tends to be a bit behind by giving us only one nine after the comma (around 99.9%), while others (AWS and Azure) are closer to 100% with at least a few more nines. Still, all three are relatively reliable, and we can say that all provide a highly available service.
We can also speak about scalability, security, state persistence, and so on and so forth. The truth is that FaaS solutions are about the same everywhere. And that leaves us with only one crucial thing that might influence our decision where to run functions.
Cost#
The cost of running functions is probably on the top of everyone’s list. But, in the context of comparing providers, that’s not an essential criterion. Simply put, all are similarly priced. It’s difficult to say who is cheaper since many factors can influence the cost. Nevertheless, no matter the usage patterns of our functions, they’ll cost us about the same everywhere. The differences are usually not more than ten percent. So, we can’t use the price as a differentiator either.
Note: Since we’re talking about the cost, we should stress that FaaS tends to be very expensive when running at scale. Our previous statements are aimed at comments about the differences in pricing between the major providers, and not about the cost-effectiveness of using managed FaaS in general.
Conclusion#
Truth be told, the comparison between FaaS solutions is almost irrelevant. There are no vast differences, and more importantly, you’ve probably already chosen what provider you’re using. It’s highly unlikely that you will switch your provider without a very compelling reason.
All in all, managed FaaS solutions are very similar, at least between the “big three” providers.
We can conclude that all FaaS solutions are similarly good or, depending on the point of view, that they’re all equally bad.
To FaaS or Not to FaaS?
Summary: FaaS